

package com.hazelcast.internal.management.events;

import com.hazelcast.internal.json.JsonObject;

import java.util.UUID;

import static java.util.Objects.requireNonNull;

abstract class AbstractWanEvent extends AbstractEventBase {
    private final UUID uuid;

    protected AbstractWanEvent(UUID uuid) {
        this.uuid = requireNonNull(uuid, "UUID must not be null");
    }

    public UUID getUuid() {
        return uuid;
    }

    @Override
    public JsonObject toJson() {
        JsonObject json = new JsonObject();
        json.add("uuid", uuid.toString());
        return json;
    }
}
